home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Boot Disc 12
/
boot-disc-1997-08.iso
/
Cakewalk
/
AD.1
/
Split Channel to Tracks.cal
< prev
next >
Wrap
Text File
|
1997-05-15
|
1KB
|
49 lines
;
; Split Channel to Tracks.cal
;
; This takes the current track and splits it by channel into 16 other tracks.
; It is up to the user to:
; - position the cursor on the desired track to be split
; - make sure only that track is selected
; - set From and Thru to cover whatever portion of it they wish split
;
(do
(include "need20.cal") ; Require version 2.0 or higher of CAL
(int nTrk 1)
(getInt nTrk "First destination track?" 1 256)
(-- nTrk) ; CAL uses 0..255
(int nChannel 0)
(while (< nChannel 16)
(do
; Provide some progress information on the message line
(message "Channel " (+ 1 nChannel) " --> Track " (+ 1 nTrk))
; Set the event filter 0 to include everything
(ResetFilter 0 1)
; Restrict item 10, Channel, to be in the range nChannel..nChannel
(SetFilterRange 0 10 TRUE nChannel nChannel)
; Now use that to cut the events meeting the criteria
(EditCut From Thru TRUE TRUE FALSE FALSE FALSE FALSE)
; Paste them to the destination track, nTrk
(EditPasteToTrack From TRUE FALSE TRUE FALSE FALSE FALSE nTrk)
; Give track an informative name
(TrackName (format "Split Chan " (+ 1 nChannel)) nTrk)
; Set the forced channel, although that's redundant because all the events
; in the track have that channel
(TrackChannel nChannel nTrk)
; Un-mute the track
(TrackActive TRUE nTrk)
(++ nChannel)
(++ nTrk)
)
)
)